/*
 * Copyright (c) 2016. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package pw.goyd.game.logic;

import pw.goyd.game.model.Player;
import pw.goyd.protocol.core.Serializer;

import java.util.List;

/**
 * 金币排行榜响应
 * Created by StanWind on 2016/11/3.
 */
public class GoldRankListResponse extends Serializer {
    private List<Player> playerList;

    public List<Player> getPlayerList() {
        return playerList;
    }

    public void setPlayerList(List<Player> playerList) {
        this.playerList = playerList;
    }

    @Override
    protected void write() {
        for (Player p : playerList) {
            writeString(p.getNickname());
            writeInt(p.getGold());
            writeString(p.getIcon_source());
        }
    }

    @Override
    protected void read() {

    }
}
